import request from '@/utils/request'

const api_name = '/admin/hosp/hospitalSet'

export default {
    //带条件分页查询医院设置
    pageQuery(page, limit, searchObj) {
        return request({
            url: `${api_name}/pageQuery/${page}/${limit}`,
            method: 'post',
            data: searchObj //用json方式传递数据
        })
    },
    //根据id删除医院
    removeById(id) {
        return request({
            url: `${api_name}/${id}`,
            method: 'delete',
        })
    },
    //医院设置新增
    save(hospitalSet) {
        return request({
            url: `${api_name}/save`,
            method: 'post',
            data: hospitalSet //用json方式传递数据
        })
    },
    //根据id查询医院设置
    getHospSetById(id) {
        return request({
            url: `${api_name}/getHospSetById/${id}`,
            method: 'get'
        })
    },
    //医院设置修改
    update(hospitalSet) {
        return request({
            url: `${api_name}/update`,
            method: 'post',
            data: hospitalSet //以json方式传递
        })
    },
    //根据id集合批量删除医院
    batchRemove(idList) {
        return request({
            url: `${api_name}/batchRemove`,
            method: 'delete',
            data: idList
        })
    },
    // 医院设置锁定和解锁
    lockHospitalSet(id,status){
        return request({
            url: `${api_name}/lockHospitalSet/${id}/${status}`,
            method: 'put'
        })
    }




}